<table class="lb_block" cellpadding="2" cellspacing="1">
	<tr>
		<td class="lb_block_title">{$smarty.const.LANG_MAIN_MENU}</td>
	</tr>
	<tr>
		<td class="lb_block_body" align="center">
				<a href="{$webdir}index.php">{$smarty.const.LANG_HOME}</a><br />
				<a href="{$webdir}index.php?action=search">{$smarty.const.LANG_SEARCH}</a><br />
		</td>
	</tr>
</table>

<table class="lb_block" cellpadding="2" cellspacing="1">
	<tr>
		<td class="lb_block_title">{$smarty.const.LANG_BLOCK_LOGIN}</td>
	</tr>
	<tr>
		<td class="lb_block_body">
			{if $logged}
				{$smarty.const.LANG_WELCOME} {$username}!<br />{$smarty.const.LANG_LOGGED_IN}<br />
				<form action="{$lb.webdir}index.php" method="POST">
				<input name="logout" type="submit" value="{$smarty.const.LANG_LOGOUT}">
				<input name="redirect" type="hidden" value="{$lb.current_full_file}">
				<input name="action" type="hidden" value="logout">
				</form>
			{else}
				<form action="{$lb.webdir}index.php" method="POST">
				<table cellpadding="1" cellspacing="1" border="0">
				<tr>
					<td>
						{$smarty.const.LANG_USER_NAME}: 
					</td>
					<td>
						<input name="username" type="text" value="username" onclick="if(this.value=='username') this.value='';">
					</td>
				</tr>
				<tr>
					<td>
						{$smarty.const.LANG_PASSWORD}: 
					</td>
					<td>
						<input name="password" type="password" value="password" onclick="if(this.value=='password') this.value='';">
					</td>
				</tr>
				<tr>
					<td>
						{$smarty.const.LANG_REMEMBER_ME}: 
					</td>
					<td>
						<input name="remember" type="checkbox" />
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
					<td>
						<input name="redirect" type="hidden" value="{$lb.current_full_file}">
						<input name="login" type="submit" value="{$smarty.const.LANG_LOGIN}">
					</td>
				</tr>
			</table>
				</form>
			{/if}
		</td>
	</tr>
</table>

{if !$search && $task != 'error' && $write}
<table class="lb_block" cellpadding="2" cellspacing="1">
	<tr>
		<td class="lb_block_title">{$smarty.const.LANG_BLOCK_PAGE_MOD}</td>
	</tr>
	<tr>
		<td class="lb_block_body">
			{if isset($menu_close_link)}
				<div class="lb_close_link"><a href="{$menu_close_link}">{$smarty.const.LANG_CLOSE}</a></div>
			{else}
				{if $write}
					<div class="lb_edit_link"><a href="{$webdir}index.php?action=edit&amp;page={$page}">{$smarty.const.LANG_EDIT}</a></div>
					<div><a href="{$webdir}index.php?action=add&amp;page={$page}">{$smarty.const.LANG_ADD_PAGE}</a></div>
					<div><a href="{$webdir}index.php?action=move&amp;page={$page}">{$smarty.const.LANG_MOVE_PAGE}</a></div>
					<div><a href="{$webdir}index.php?action=remove&amp;page={$page}">{$smarty.const.LANG_REMOVE_PAGE}</a></div>
				{/if}
			{/if}
		</td>
	</tr>
</table>
{/if}
{if !$search}
<table class="lb_block" cellpadding="2" cellspacing="1">
	<tr>
		<td class="lb_block_title">{$smarty.const.LANG_BLOCK_PAGE_INFO}</td>
	</tr>
	<tr>
		<td class="lb_block_body">
			{if isset($parent)}
			{$smarty.const.LANG_PARENT}
			<ul class="lb_menulist">
			<li class="lb_menuitem"><a href="{$parent.link}">{$parent.title}</a></li>
			</ul>
			{/if}
			{if isset($family)}
			{$smarty.const.LANG_FAMILY}
			<ul class="lb_menulist">
			{foreach key=cid item=cur from=$family}
		    <li class="lb_menuitem"><a href="{$cur.link}">{$cur.title}</a></li>
		    {/foreach}
			</ul>
			{/if}
			{if isset($list)}
			{$smarty.const.LANG_CHILDS}
			<ul class="lb_menulist">
			{foreach key=cid item=cur from=$list}
		    <li class="lb_menuitem"><a href="{$cur.link}">{$cur.title}</a></li>
		    {/foreach}
			</ul>
			{/if}
		</td>
	</tr>
</table>
{/if}

{if !$search}
<table class="lb_block" cellpadding="2" cellspacing="1">
	<tr>
		<td class="lb_block_title">{$smarty.const.LANG_BLOCK_SEARCH}</td>
	</tr>
	<tr>
		<td class="lb_block_body" align="center">
			<br />
			<form action="{$lb.webdir}index.php" method="get">
				<input type="hidden" name="action" value="search">
				<table cellpadding="1" cellspacing="1" border="0" align="center">
					<tr>
						<td>
							{$smarty.const.LANG_SEARCH_KEY}:
						</td>
						<td>
							<input type="text" name="q" value="{$search_query|default:""}">
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td align="center">
							<input type="submit" value="{$smarty.const.LANG_SUBMIT}">
						</td>
					</tr>
				</table>
			</form>
			<br />
		</td>
	</tr>
</table>
{/if}
